/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.system.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;

/**
* @website https://el-admin.vip
* @description /
* @author zhaoxiancheng
* @date 2021-11-18
**/
@Entity
@Data
@Table(name="atmr")
public class Atmr implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    @ApiModelProperty(value = "编号，自增")
    private Integer id;

    @Column(name = "atmr_name")
    @ApiModelProperty(value = "测试名称")
    private String atmrName;

    @Column(name = "atmr_type")
    @ApiModelProperty(value = "测试类型")
    private String atmrType;

    @Column(name = "atmr_desc")
    @ApiModelProperty(value = "测试说明")
    private String atmrDesc;

    @Column(name = "remark")
    @ApiModelProperty(value = "备注")
    private String remark;

    @Column(name = "price")
    @ApiModelProperty(value = "测试价格")
    private String price;

    @Column(name = "status")
    @ApiModelProperty(value = "是否启用：0-启用；1-停用")
    private String status;

    @Column(name = "exam_count")
    @ApiModelProperty(value = "总题数")
    private String examCount;

    @Column(name = "report_price")
    @ApiModelProperty(value = "测试报告费用")
    private String reportPrice;

    @Column(name = "icon_url")
    @ApiModelProperty(value = "图标地址")
    private String iconUrl;

    @Column(name = "exam_database_id")
    @ApiModelProperty(value = "题库Id")
    private Long examDatabaseId;

    /**
     * 成人或儿童 1：成人 2：儿童
     */
    @Column(name = "age_type")
    @ApiModelProperty(value = "成人或儿童 1：成人 2：儿童")
    private String ageType;
    /**
     * 副标题
     */
    @Column(name = "sub_title")
    @ApiModelProperty(value = "副标题")
    private String subTitle;

    public void copy(Atmr source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}